Skip to content

fix: highlight links in profile bios - #712

Closed
Matildevoldsen wants to merge 1 commit into
dev-null-sh:productionfrom
Matildevoldsen:fix/profile-bio-links
Closed

Matildevoldsen wants to merge 1 commit into
dev-null-sh:productionfrom
Matildevoldsen:fix/profile-bio-links

Conversation

@Matildevoldsen

Copy link
Copy Markdown

Profile bios render URLs as plain text, so readers cannot follow links in a developer's description. Render the bio with the existing LinkifiedText component so URLs get the same highlighting, shortening, and safe link attributes as commits.

A small ProfileBio component preserves the existing spacing and line breaks and omits empty bios. Regression tests cover bare domains, www., HTTP/HTTPS, paths, queries, fragments, punctuation, HTML escaping, and text that should stay unlinked. The knowledge base documents the behavior.

Before and after

Same seeded profile, bio, viewport (1440 × 900), and light theme. The bio includes example.com, www.example.com, http://example.com, https://example.com, a URL with a query and fragment, and an email address.

Before After
Before: profile bio URLs render as plain text After: profile bio URLs are highlighted and clickable

Validation

  • bun run build
  • composer test:types (PHPStan and both TypeScript projects)
  • composer test:type-coverage — 100%
  • bun run test:unit — 85 passed
  • bun x vp test --config tests/draft-images.config.ts — 156 passed, including 31 profile bio tests
  • Manually verified the seeded Laravel profile in light and dark themes at 1440 × 900, 1366 × 650, and 390 × 844; checked link destinations, safe external-link attributes, text wrapping, and profile tab navigation.
  • composer test:lint — passed (three existing no-floating-promises warnings in IssueCommands.test.ts)
  • Full PHP suite with --parallel --ci --coverage --exactly=100.0 — 3,281 tests passed, 100% coverage
  • PR title checked against the repository's commitlint configuration

@hbenabdallah

Copy link
Copy Markdown
Contributor

#463 already does this (links URLs in profile bios with LinkifiedText, closes #426). Worth keeping just one of the two.

@hbenabdallah

Copy link
Copy Markdown
Contributor

Duplicate of #463 (same change for #426).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants